Repository navigation
fix(kubescape): keep foreground storage writes schedulable - #3448
Conversation
✅
|
@coderabbitai review Exact current head: |
|
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details🔇 Additional comments (3)
📝 WalkthroughWalkthroughThe hotfix pins the container-profile maintenance worker count to one. It updates transaction tests to confirm that read-phase transactions do not reserve SQLite’s writer. The validation script now checks the Merge Risk: ⚪ Minimal · up to The change limits background storage maintenance to one worker and keeps foreground writes schedulable; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |

Root cause
Production acceptance of #3444 proved the immediate-transaction fix is incomplete. Controlled scan
ad9b70ed-37d6-415f-8bc3-062351dff300saved locally, then timed out persisting whileWorkloadConfigurationScanremained stale.BEGIN IMMEDIATEremoves the two-worker lock-promotion deadlock, but it reserves SQLite's only writer before minutes of container-profile reads and computation. Two background consolidation workers can then hand the writer lock between themselves and starve foreground REST persistence past its deadline.Fix
sqlite-contention.3compatibility image from protectedmainonly.Proof
2, and a foreground writer receivedSQLITE_BUSYwhile the background transaction was only reading.go test ./pkg/registry/filepasses on exact upstream sourceb35788b68337134fc2514574cde1ba7f1225fd43after applying the packaged patch.go test -racepasses.git diff --checkpass.This PR publishes the corrected image. It deliberately does not change the live HelmRelease; deployment and a second controlled scan follow only after the protected main image is signed and verified.
Refs #3275.